import ajax from "./promiseAjax.js";

let userNameR = document.querySelector(".userName");
let session = document.querySelector(".session");

let userName = sessionStorage.getItem("userName");
let phone = sessionStorage.getItem("phone");
let completeTime = sessionStorage.getItem("completeTime");

let reportApi = "http://newshopapi.0melon0.cn/api/f_user/report";
let reportData = {
  "phone":phone,
  "name":userName
}
ajax(reportApi, reportData, "POST").then(res => {
  userNameR.innerHTML = `姓名：${userName}`;
  session.innerHTML = `场次：${completeTime}`;
  console.log(res);
})